home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / pgm_util / sealit / wizard / vbexampl / frmmain.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-01-07  |  1.3 KB  |  45 lines

  1. VERSION 2.00
  2. Begin Form frmMain
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   8490
  5.    ClientLeft      =   1020
  6.    ClientTop       =   1425
  7.    ClientWidth     =   7305
  8.    Height          =   8865
  9.    Left            =   975
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   8490
  12.    ScaleWidth      =   7305
  13.    Top             =   1095
  14. Option Explicit
  15. Sub Form_Load ()
  16.     Initialize
  17. End Sub
  18. Sub Initialize ()
  19.     Dim wSealLen%
  20.     Dim ApplicationInfo As APPINFO
  21.     Dim VBExample as VBExample
  22.     Dim wErr%
  23.     ApplicationInfo.bOverWriteSeal = False
  24.     ApplicationInfo.szMagicString = "demomagicstring" & Chr$(0) 
  25.     ApplicationInfo.szAppName = CurDir$ & "\"& App.EXEName & ".EXE" & chr$(0)
  26.     wSealLen% = Len(VBExample)
  27.     wErr% = ValidateApplication(ApplicationInfo, wSealLen%, VBExample)
  28.     If wErr% <> 0 Then
  29.         'Stop, an error
  30.         Dim szErrorString As String * 250
  31.         GetSealError wErr%, szErrorString
  32.         MsgBox szErrorString
  33.     Else
  34.         'HighLight bWinNT and press Shift-F9.
  35.         'You will be able to see the value..
  36.         'VBExample.bWinNT
  37.         'VBExample.bWin95
  38.         'VBExample.bWin31
  39.         'VBExample.dtExpirationDate
  40.         'VBExample.szCompany
  41.         'VBExample.szName
  42.         'VBExample.szMagicString
  43.     End if
  44. End Sub
  45.